import httpReqeust from "../config";

const model = "/bpmn/def/";

// 分页查询
export const page = (data) => {
  return httpReqeust.post(model + "page", data);
};

// 删除
export const delById = (id) => {
  return httpReqeust.get(model + "delete?id=" + id);
};

// 根据id查询
export const getById = (id) => {
  return httpReqeust.get(model + "getById?id=" + id);
};

// 更新和删除
export const saveOrUpdate = (data) => {
  return httpReqeust.post(model + "saveOrUpdate", data);
};

// 部署流程
export const deployment = (data) => {
  return httpReqeust.post(model + "deployment", data);
};

export const getProcessXml = (id) => {
  return httpReqeust.get(model + "getProcessXml?id=" + id);
};

export const getProcessXmlByDefinitionId = (id) => {
  return httpReqeust.get(model + "getProcessXmlByDefinitionId?processDefinitionId=" + id);
};
